package ooday01;

public class Exercise {
    public static void main(String[] args) {
        Student zs = new Student("zs",15,"2302","001");
        Student ls = new Student();
        Student ww = new Student("ww",18);
        zs.sayHi();
        ls.sayHi();
        ww.sayHi();

        Car tsl = new Car("特斯拉","白色",500000.0);
        tsl.start();
        tsl.run();
        tsl.stop();
    }

}
/*
public class Student {
    String name;
    int age;
    String className;
    String stuId;
    Student(){

    }
    Student(String name, int age){
        this.name = name;
        this.age = age;
    }
    void study(){
        System.out.println(this.name+"在学习");
    }

    void sayHi(){
        System.out.println("大家好，我叫"+this.name+",今年"+this.age+"岁了，所在班级是"+this.className+",学号是"+this.stuId);
    }

    void playwith(String anotherName){
        System.out.println("现在在和"+anotherName+"玩");
    }



    Student(String name, int age, String className, String stuId) {
        this.name = name;
        this.age = age;
        this.className = className;
        this.stuId = stuId;

    }
}

 */
/*
public class Car {
    String brand;
    String color;
    double price;

    Car() {
    }

    Car(String brand,String color,double price){
        this.brand = brand;
        this.color = color;
        this.price = price;
    }

    void start(){
        System.out.println(brand+"牌子的"+color+"颜色的"+price+"块钱的车启动了……");
    }

    void run(){
        System.out.println(brand+"牌子的"+color+"颜色的"+price+"块钱的车开始跑了……");
    }

    void stop(){
        System.out.println(brand+"牌子的"+color+"颜色的"+price+"块钱的车停止了……");
    }

}
*/